package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.body.FilesGetUploadUrlParamBody;
import net.yondervision.hrfsp.sdk.esign.domain.response.FilesGetUploadUrlResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/10/29 17:43
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class FilesGetUploadUrlRequest extends AbstractESignRequest implements
    ESignRequest<FilesGetUploadUrlResponse> {

  private FilesGetUploadUrlParamBody filesGetUploadUrlParamBody;

  public FilesGetUploadUrlRequest(
      FilesGetUploadUrlParamBody filesGetUploadUrlParamBody) {
    this.filesGetUploadUrlParamBody = filesGetUploadUrlParamBody;
    this.setParamBody(filesGetUploadUrlParamBody);
  }

  @Override
  public String getUrl() {
    return "/files/getUploadUrl";
  }

  @Override
  public Method getMethodType() {
    return Method.POST;
  }


  @Override
  public Class<FilesGetUploadUrlResponse> getResponseClass() {
    return FilesGetUploadUrlResponse.class;
  }

}
